[Unit]
Description=Etcd Server
After=network.target
After=network-online.target
Wants=network-online.target
Documentation=https://github.com/coreos
[Service]
Type=notify
WorkingDirectory={{ var_etcd_data_dir }}
ExecStart={{ var_etcd_dir_bin }}/etcd \
          --name={{ var_etcd_names }} \
          --data-dir={{ var_etcd_data_dir }}/default.etcd \
          --listen-peer-urls=https://{{ var_etcd_host }}:{{ var_etcd_peer_port }} \
          --listen-client-urls=https://{{ var_etcd_host }}:{{ var_etcd_client_port }},{{ var_etcd_localhost_client }} \
          --advertise-client-urls=https://{{ var_etcd_host }}:{{ var_etcd_client_port }} \
          --initial-advertise-peer-urls=https://{{ var_etcd_host }}:{{ var_etcd_peer_port }} \
          --initial-cluster={{ var_etcd_names }}=https://{{ var_etcd_host }}:{{ var_etcd_peer_port }} \
          --initial-cluster-token={{ var_etcd_initial_cluster_token }} \
          --initial-cluster-state={{ var_etcd_initial_cluster_state }} \
          --cert-file={{ var_ssl_etcd_dir }}/{{ var_ssl_etcd_cert_prefix }}.pem \
          --key-file={{ var_ssl_etcd_dir }}/{{ var_ssl_etcd_cert_prefix }}-key.pem \
          --peer-cert-file={{ var_ssl_etcd_dir }}/{{ var_ssl_etcd_cert_prefix }}.pem \
          --peer-key-file={{ var_ssl_etcd_dir }}/{{ var_ssl_etcd_cert_prefix }}-key.pem \
          --trusted-ca-file={{ var_ssl_ca_dir }}/{{ var_ssl_file_ca_pem }} \
          --peer-trusted-ca-file={{ var_ssl_ca_dir }}/{{ var_ssl_file_ca_pem }}
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
